In Patent Document 1, there is disclosed a motor provided with an encoder for detecting a turn of a rotor. In the motor that Patent Document 1 discloses, the encoder includes a magnetism sensing element installed on a circuit board, and a magnet that turns together with an output shaft of the motor. The circuit board is supported by a holder fixed to a motor case. The circuit board, on which the magnetism sensing element is installed, and the magnet are covered by a cover member. The cover member is fixed to an inside surface of an encoder case that is fixed to the motor case.